home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / allfiles / Itch / work_info / WImage.dcr / 00020_HitZone Parent.ls < prev    next >
Encoding:
Text File  |  1999-03-07  |  465 b   |  22 lines

  1. property sp, pos, hitRect, boxOffset
  2.  
  3. on new me, asp, aPos
  4.   me.sp = asp
  5.   puppetSprite(me.sp, 1)
  6.   boxOffset = point(the width of sprite me.sp / 2, the height of sprite me.sp / 2)
  7.   me.pos = aPos - boxOffset
  8.   DrawtoStage(me)
  9.   me.hitRect = the rect of sprite me.sp
  10.   return me
  11. end
  12.  
  13. on UpdatePos me, aPos
  14.   tempPos = me.pos + aPos
  15.   me.pos = tempPos
  16. end
  17.  
  18. on DrawtoStage me
  19.   set the loc of sprite the sp of me to me.pos
  20.   me.hitRect = the rect of sprite me.sp
  21. end
  22.